package com.example.day2.busi.login;

import androidx.lifecycle.MutableLiveData;

import com.example.day2.entity.LoginParam;
import com.example.day2.entity.LoginResult;
import com.example.day2.mvvm.base.BaseActivity;
import com.example.day2.mvvm.base.BaseViewModel;

public class LoginViewModel extends BaseViewModel<LoginRepo> {
    protected MutableLiveData<LoginResult> success = new MutableLiveData<>();
    protected MutableLiveData<String> fail = new MutableLiveData<>();

    public void LoginViewModel(LoginParam loginParam) {
        repo.login(loginParam,success,fail);
    }

    @Override
    public LoginRepo createRepo() {
        return new LoginRepo();
    }
}
